﻿<Window x:Class="YSGetLatest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="YS Get Latest" Height="350" Width="525"
		Style="{StaticResource MyWindow}" WindowStartupLocation="CenterScreen"
		Icon="/YsGetLatest;component/App.ico">
	<Window.InputBindings>
		<KeyBinding Gesture="Ctrl+Q" Command="{Binding QuitCommand}"/>
	</Window.InputBindings>
	<DockPanel>
		<Menu DockPanel.Dock="Top">
			<MenuItem Header="_Projects">
				<MenuItem Header="_Add" Command="{Binding AddProjectCommand}"/>
				<MenuItem Header="_Open" Command="{Binding OpenProjectCommand}"/>
				<MenuItem Header="_Delete" Command="{Binding DeleteProjectCommand}"/>
				<Separator/>
				<MenuItem Header="O_ptions" Command="{Binding OptionsCommand}"/>
				<Separator/>
				<MenuItem Header="_Quit" Command="{Binding QuitCommand}"/>
			</MenuItem>
			<MenuItem Header="_Help">
				<MenuItem Header="_About" Click="MenuItemAbout_Click"/>
			</MenuItem>
		</Menu>

		<ListBox DockPanel.Dock="Top" Name="listBoxProjects" ItemsSource="{Binding Path=Projects.ProjectList}">
			<ListBox.ItemContainerStyle>
				<Style TargetType="{x:Type ListBoxItem}">
					<EventSetter Event="MouseDoubleClick" Handler="ListBoxProjects_MouseDoubleClick" />
					<Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}"/>
				</Style>
			</ListBox.ItemContainerStyle>

			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding Path=Name}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</DockPanel>
</Window>
